# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=baloo
pkgver=6.1.0
pkgrel=0
pkgdesc="A framework for searching and managing metadata"
# armhf blocked by qt6-qtdeclarative
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-or-later AND ( LGPL-2.1-only OR LGPL-3.0-only )"
depends_dev="
	kbookmarks-dev
	kcompletion-dev
	kconfig-dev
	kcoreaddons-dev
	kcrash-dev
	kdbusaddons-dev
	kfilemetadata-dev
	ki18n-dev
	kidletime-dev
	kio-dev
	kjobwidgets-dev
	kservice-dev
	lmdb-dev
	qt6-qtdeclarative-dev
	solid-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	qt6-qtbase-dev
	samurai
	"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/baloo.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/baloo-$pkgver.tar.xz"

replaces="baloo5"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	# We don't ship systemd
	rm -r "$pkgdir"/usr/lib/systemd
}

sha512sums="
a755a52ace391235bb2231b51a192ba6e32b682670ce761b57c858b10231cee0965c3d9657a27198e4be86a07460660b064e16e2c952c40d880f1dcc32d7eb27  baloo-6.1.0.tar.xz
"
